package com.example.demo.service;

import com.example.demo.dao.ArticleMapper;
import com.example.demo.model.ArticleInfo;
import com.example.demo.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArticleService {
    @Autowired
    private ArticleMapper articleMapper;
    //根据用户的id查询用户的文章
    public List<ArticleInfo> getArticlesByUid(UserInfo userInfo) {
        return articleMapper.getArticlesByUid(userInfo.getId());
    }
    //

}
